%ion-view#home-page(view-title="@球友-交友、学习、竞技的综合平台" hide-nav-bar="true")
  %ion-header-bar.bar.bar-furion(align-title="center")
    %h1.title 附近
    .list.bar-bottom
      .row.row-buttons-with-line
        .col.col-20(ng-click="changeType('amateur')" ng-class="{'active': type == 'amateur'}")
          球友
        .col.col-20(ng-click="changeType('club')" ng-class="{'active': type == 'club'}")
          球房

  %ion-content.ng-cloak(ng-cloak)
    %ion-refresher(pulling-text="下拉刷新..." on-refresh="getMoreList(1)" refreshing-text="数据刷新中")

    .list.margin-top-50
      .item.item-avatar(ng-repeat="i in list track by $index" ui-sref="dynamic-detail({id: i.id, type: type})")
        %img(ng-src="{{i.avatar}}")
        %h2 
          .row.no-padding
            .col.no-padding
              {{i.vname}}
              %span.icon.icon-ok-male.thin-blue.margin-left-10(ng-if="i.sex == 'female'")
              %span.icon.icon-ok-female.thin-blue.margin-left-10(ng-if="i.sex == 'male'")
            .col.no-padding.text-grey.small(ng-if="type == 'amateur'")
              %i.icon.icon-ok-level.orange.supersmall
              Lev {{i.level}}
            .col.no-padding(ng-if="type == 'club'")
              %i.ion-star.orange(ng-repeat="l in level_num[$index] track by $index")
            -# .col.no-padding.text-right
            -#   %span.text-grey.small 相距 {{type == 'club' ? (i.distance | distanceLimit) : i.distance}}km
        %p(ng-if="type == 'amateur'") {{i.msg}}
        %p(ng-if="type == 'club'") 地址：{{i.ip}}
        %p(ng-if="type == 'club'") 地址：{{i.phone}}
        %img(style="max-width: 85%" ng-src="{{i.da}}" ng-if="i.da")

    %p.text-grey.text-center(ng-if="cur_page == max_page") 没有更多消息了~
    %ion-infinite-scroll(on-infinite="getMoreList(cur_page + 1)" distance="10%" immediate-check="false" ng-if="cur_page < max_page")

    
